import request from "@/utils/request";

// GET /admin/product/baseTrademark/{page}/{limit} 分页列表
// POST /admin/product/baseTrademark/save 新增品牌
// PUT /admin/product/baseTrademark/update 修改品牌
// DELETE /admin/product/baseTrademark/remove/{id}  删除品牌

// GET /admin/product/baseTrademark/getTrademarkList 获取所有的品牌


// 获取分页列表
export const getTrademarkPageListApi = (page, limit) => {
  return request.get(`/admin/product/baseTrademark/${page}/${limit}`);
};

// 新增品牌
export const saveTrademarkApi = (tmName, logoUrl) => {
  return request.post(`/admin/product/baseTrademark/save`, { tmName, logoUrl });
};

// 更新品牌
export const updateTrademarkApi = (trademark) => {
  return request.put(`/admin/product/baseTrademark/update`, trademark);
};

//  删除品牌
export const removeTrademarkApi = (id) => {
  return request.delete(`/admin/product/baseTrademark/remove/${id}`);
};